using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_DataSet_MsgType_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.DataSet.MsgType);

            field = type.GetField("Def", flag);
            app.RegisterCLRFieldGetter(field, get_Def_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_Def_0, null);
            field = type.GetField("Rpc", flag);
            app.RegisterCLRFieldGetter(field, get_Rpc_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_Rpc_1, null);
            field = type.GetField("Game", flag);
            app.RegisterCLRFieldGetter(field, get_Game_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_Game_2, null);
            field = type.GetField("Query", flag);
            app.RegisterCLRFieldGetter(field, get_Query_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_Query_3, null);
            field = type.GetField("Mail", flag);
            app.RegisterCLRFieldGetter(field, get_Mail_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_Mail_4, null);
            field = type.GetField("Broadcast", flag);
            app.RegisterCLRFieldGetter(field, get_Broadcast_5);
            app.RegisterCLRFieldBinding(field, CopyToStack_Broadcast_5, null);
            field = type.GetField("Chat", flag);
            app.RegisterCLRFieldGetter(field, get_Chat_6);
            app.RegisterCLRFieldBinding(field, CopyToStack_Chat_6, null);
            field = type.GetField("Transit", flag);
            app.RegisterCLRFieldGetter(field, get_Transit_7);
            app.RegisterCLRFieldBinding(field, CopyToStack_Transit_7, null);
            field = type.GetField("Log", flag);
            app.RegisterCLRFieldGetter(field, get_Log_8);
            app.RegisterCLRFieldBinding(field, CopyToStack_Log_8, null);
            field = type.GetField("Debug", flag);
            app.RegisterCLRFieldGetter(field, get_Debug_9);
            app.RegisterCLRFieldBinding(field, CopyToStack_Debug_9, null);
            field = type.GetField("ServerQuery", flag);
            app.RegisterCLRFieldGetter(field, get_ServerQuery_10);
            app.RegisterCLRFieldBinding(field, CopyToStack_ServerQuery_10, null);
            field = type.GetField("Record", flag);
            app.RegisterCLRFieldGetter(field, get_Record_11);
            app.RegisterCLRFieldBinding(field, CopyToStack_Record_11, null);
            field = type.GetField("Build", flag);
            app.RegisterCLRFieldGetter(field, get_Build_12);
            app.RegisterCLRFieldBinding(field, CopyToStack_Build_12, null);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.DataSet.MsgType());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.DataSet.MsgType[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_Def_0(ref object o)
        {
            return huqiang.DataSet.MsgType.Def;
        }

        static StackObject* CopyToStack_Def_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.DataSet.MsgType.Def;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Rpc_1(ref object o)
        {
            return huqiang.DataSet.MsgType.Rpc;
        }

        static StackObject* CopyToStack_Rpc_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.DataSet.MsgType.Rpc;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Game_2(ref object o)
        {
            return huqiang.DataSet.MsgType.Game;
        }

        static StackObject* CopyToStack_Game_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.DataSet.MsgType.Game;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Query_3(ref object o)
        {
            return huqiang.DataSet.MsgType.Query;
        }

        static StackObject* CopyToStack_Query_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.DataSet.MsgType.Query;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Mail_4(ref object o)
        {
            return huqiang.DataSet.MsgType.Mail;
        }

        static StackObject* CopyToStack_Mail_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.DataSet.MsgType.Mail;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Broadcast_5(ref object o)
        {
            return huqiang.DataSet.MsgType.Broadcast;
        }

        static StackObject* CopyToStack_Broadcast_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.DataSet.MsgType.Broadcast;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Chat_6(ref object o)
        {
            return huqiang.DataSet.MsgType.Chat;
        }

        static StackObject* CopyToStack_Chat_6(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.DataSet.MsgType.Chat;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Transit_7(ref object o)
        {
            return huqiang.DataSet.MsgType.Transit;
        }

        static StackObject* CopyToStack_Transit_7(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.DataSet.MsgType.Transit;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Log_8(ref object o)
        {
            return huqiang.DataSet.MsgType.Log;
        }

        static StackObject* CopyToStack_Log_8(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.DataSet.MsgType.Log;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Debug_9(ref object o)
        {
            return huqiang.DataSet.MsgType.Debug;
        }

        static StackObject* CopyToStack_Debug_9(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.DataSet.MsgType.Debug;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_ServerQuery_10(ref object o)
        {
            return huqiang.DataSet.MsgType.ServerQuery;
        }

        static StackObject* CopyToStack_ServerQuery_10(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.DataSet.MsgType.ServerQuery;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Record_11(ref object o)
        {
            return huqiang.DataSet.MsgType.Record;
        }

        static StackObject* CopyToStack_Record_11(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.DataSet.MsgType.Record;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Build_12(ref object o)
        {
            return huqiang.DataSet.MsgType.Build;
        }

        static StackObject* CopyToStack_Build_12(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.DataSet.MsgType.Build;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.DataSet.MsgType();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
